package com.kingdee.eas.hr.time;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

public class YearVacationQuantityInfo extends AbstractYearVacationQuantityInfo
		implements Serializable {
	public YearVacationQuantityInfo() {
		super();
	}

	protected YearVacationQuantityInfo(String pkField) {
		super(pkField);
	}

	public Map parseQuantity(String quantity) {
		Map map = new HashMap(16);
		String[] items = quantity.split("&");
		for (int i = 0; i < items.length; i++) {
			String[] subItems = items[i].split("=");
			String[] subItemss = items[i].split("_");
			if ((subItems.length == 2) && (items[i].indexOf("_") == -1)) {
				map.put(new Integer(subItems[0].trim()), subItems[1].trim());
			}
			if (subItemss.length != 3)
				continue;
			map.put(new Integer(subItemss[1].trim()), subItemss[2].trim());
		}

		return map;
	}
}